home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
me_cd22.zip
/
DOC.ZIP
/
PACKAGE.DOC
< prev
next >
Wrap
Text File
|
1992-04-27
|
37KB
|
849 lines
========================================================================
== ME2 Packages Craig Durland 10/91 ==
========================================================================
Here is some documentation on some of the packages of Mutt programs I
use.
Copyright 1991 Craig Durland
Distributed under the terms of the GNU General Public License.
Distributed "as is", without warranties of any kind, but comments,
suggestions and bug reports are welcome.
========================================================================
== Customizing me2.mut ==
========================================================================
Overview:
When ME2 runs, it tries to load me2.mco. The me2.mco shipped with ME2
tries to load several files:
osstuff.mco : OS related stuff.
./mext.mco : Directory local ME2 extensions
myme.mco : Your personal ME2 extensions.
Package: myme.mut
How loaded: By me2.mut as part of start up.
Description:
This is the file that you put your personal extensions to ME2 in.
This is the stuff you don't want to everybody to have to use. You
should put myme.mco in a spot that that is only in your ME2 path
(such as your home directory).
A copy of the file I use is in ../mutt/myme.mut.
Functions you might to call:
command-line-done (bool it-has-been-processed)
Call this if you have processed the command line.
Package: osstuff.mco
See: OS Stuff below.
Package: ./mext.mut
How loaded: By me2.mut as part of start up.
Description:
If this file is the current directory when ME2 starts, me2.mut will
load it. Use it to hold stuff you want ME2 to know about only in
this directory.
For example, I have a bunch of Mutt code to help me design bicycles.
I could autoload it but then I would have to type something
everytime I wanted to work on a bicycle. Since I do all the work in
the bicycle directory, I just put the code in bicycle/myme.mco and
when I run ME2, it is loaded automatically.
========================================================================
== Mark Rings ==
========================================================================
Package: markring.mut
How loaded: part of me2.mut, turned on for interactive buffers
Description:
Mark rings provide a way to mark multiple places in a buffer so you
can jump to them easily. Note that they can't span buffers. Up to 4
marks (easily changable in markring.mut) are kept, as more are set,
the ring wraps around and reuses the older marks.
Functions:
markring-push M-C-p or F-9
Push the dot into the end of the ring.
markring-pop M-p
Goto the next mark in the ring.
markring-delete Not bound
Remove the most recently popped mark from the ring.
markring-init Not bound
Use this if a markring was not setup in this buffer (it normally is)
or you want to remove all marks from the ring and start over.
========================================================================
== Mode Support ==
========================================================================
Package: alamode.mut
How loaded: part of me2.mut
Description:
This is the package that turns on modes. Here is how it works (in the
order that things happen):
- When a interactive buffer is created, if the environment variable
MEMODE is set, "-mode" is appended to it and a call is made to that
function. For example, if MEMODE is set to "mail", everytime a
interactive buffer is created, "mail-mode" is called for that
buffer. If the mode doesn't exist, ME2 will complain.
- If there is no MEMODE variable, the buffer name is looked at. The
list of modes is looked at to see if any of the modes fits the name.
(You can change the list with auto-mode-list (see below).) Here are
the default modes:
Extension Program Run
--------- ------- ---
.c c-mode
.h c-mode
.mut mutt-mode
.doc text-mode
.txt text-mode
If the program is not there, ME2 will complain, but you might not
see it because other things will be written to the command line
after the error message (like "[Read 10 lines]"). No harm is done
if the mode is not run.
If there are no matches, the default-major-mode is run (see below).
- When a file is read into a interactive buffer, the first line of the
buffer is looked at. If it contains text of the form "-*-foo-*-",
foo-mode is run.
Functions:
default-major-mode Not bound
Set the default major mode. This is the mode set for a interactive
buffer when no other mode seems to fit.
For example: If you want text mode to be the default:
(default-major-mode "text"). The "-mode" is appended when the mode
needs to be run.
The mode might be changed when the file is read in (see above).
The default is "none".
(auto-mode-list (bool append)(string mode-re mode-name ...)
Append or Prepend to the list of modes.
Input:
append: TRUE if you want your list of modes to be appended (ie
searched last) to the list of modes. There are two reasons you
might want to do this: If you have not-very-often used mode,
putting it a the end of the list means a quicker search time for
the more often used modes. If you want to override one of the
defaults, prepend so your new mode will be found first.
mode-re:
This is a regular expresion that the buffer name is tested with.
If there is a match, mode-name is run. For example, if you
want to test for the extension foo, use '.*\.foo$'. The
single quote is important. This re matches any string that
ends with the characters ".foo". Note: the re is not a
searching re - it is inplace regular expression match. That
is why you need the .* at the start.
Notes:
The mode-re is used to match the buffer name NOT the file
name. Since I do the match at buffer create time, I don't
have a file name. If you want to match file names, you will
need to change the call to set-mode from buffer-created-hook
to file-read-hook. I used buffer-created-hook because then
I can use (switch-to-buffer) and have the mode set without
reading in a file.
My Unix mailer uses temp files named "/tmp/Re<digits>". An re
to match that is 'Re[0-9]+$'. Then, whenever mail uses ME
to edit mail, you can edit with your favorite mail mode.
mode-name: The name of the mode you want to run if there is a
match. If you want c mode, use "c". The "-mode" is appended
when the mode needs to be run.
Here is the default:
(auto-mode-list TRUE
'.*\.c$' "c"
'.*\.h$' "c"
'.*\.mut$' "mutt"
'.*\.doc$' "text"
'.*\.txt$' "text"
)
If you want to get rid of mode, prepend it and use none. For
example, if you don't like c mode, use
(auto-mode-list FALSE '.*\.c$' "none" '.*\.h$' "none") and c-mode
won't be called. Of course, you could also just remove cmode.mco
and achive the same result.
If you want to get rid of all modes, use
(auto-mode-list FALSE '.' "none"). This will set every buffer to
none-mode.
Notes:
While using the mode-re's gives a lot of flexability, I wonder about
the speed hit. Knowing how all this is implemented, it seems like
all those regular expression tests has got to take a long time. It
doesn't seem to on my machine (but its a real fast machine). Does
anyone use anything but the extension? If not, it might make more
sense to just have a list of (extension, mode) pairs.
Sigh, I found a good use for the full name. See my comments about
mail in mode-re above.
========================================================================
== C Mode ==
========================================================================
Package: cmode.mut
How loaded:
Autoloaded when a buffer with extension ".c" or ".h" created or when a
file is read in with "-*-c-*-" in the first line.
Modes:
Major: C
Minor: none or comment
Description:
Electric C mode. A collection of routines I've found useful when
editing C code. It is turned on when ever you edit a .c or .h file.
Helps with comments, backspacing over tabs, { and a few others.
Electric C mode is designed to help keep your C code formatted "as
you code". You don't have to remember anything special - as you type,
what you type is looked at and may trigger certain actions. This is a
minimalist C mode ment to enable you to keep your C code formatted in
a consistant manner. The only extensive help is for comments.
Characters that trigger formatting:
Enter (return): Matches the indent level of the previous line.
"{": When a "{" is pressed, one of the following will happen:
- If the space bar is pressed, "{ }" is generated and the cursor is
put between the braces.
- If Enter is pressed:
And the rest of the line is blank, you will get something like:
if (a) { or if (a)
cursor {
} cursor
}
depending on where the "{" was. The cursor is indented by
the amount specified by "indent-level".
If the rest of the line was not blank, a newline-and-indent is
done and the text after the { is indented.
For example:
if (a) foo(): if a "{ Enter" is done before the foo()
you will get:
if (a) {
foo()
- Otherwise, a "{" is inserted.
Backspace: Behaves like backspacing over spaces even when backspacing
over tabs.
Newline (control-J): Used to give some white space after a variable
declaration block. The cursor is left at the same column as the
start of the declarations.
int j; => int j;
blank line
cursor
"/": Comment assistance.
- If "*" is pressed and the rest of the line is blank and there is
text to the left of the "/", "/* */" is generated and the cursor
is put in the middle of the comment. This is for end of line
comments like: if (a) foobar(); /* comment */
- If "*" is pressed and the entire line is blank, block comment mode
is entered. In this mode, your comment will autowrap at the
comment-wrap-column. When you hit Enter or autowrap, stars are
put in the proper place, whitespace is added to match the previous
comment line. If you press Enter "/", comment mode will
terminate. "*/" or "*" blanks "/" will also terminate comment
mode. If you want to get out of comment mode without using the
above, press M-; or execute "nocomment".
Examples:
/*
* Comment
* Indented a bit
* Next line follows the indent.
*/
/*
** Another comment style
*/
- Otherwise, a "/" is inserted.
Meta-;
If in block comment mode, turn off comment mode.
If the cursor is on a line that is part of a block comment, start up
block comment mode. This is very handy for adding to an existing
block comment.
Meta-J: Format a C block comment.
If you munge a block comment and want to set it right, use this.
This formats all the lines between the dot and mark inclusive.
Put the region around the comment (or the part of the comment you
want to format) and press M-j. The comment is commented in the
format of comment mode.
Notes:
To make sure that line breaks are preserved, insert blank lines at
the breaks. The blank lines will be deleted after the comment
is formatted.
To change the indent level of the block, indent the first line of
the region to where you want.
Control-U Meta-J: Format a C boxed comment.
Same as format block comment except the comment is boxed:
/********************************
* Comment *
********************************/
You can convert between boxed and block comments by just reformatting.
Constants (in cmode.mut) that can be modified to change formating style:
Enter-key-action
Set this to "newline-and-indent" or "newline". One of these is
called when the enter key is presses.
INDENT-LEVEL
This is the number of spaces to indent a block ie :
{
<block indent>
}
Default is 2.
COMMENT-WRAP-COLUMN
The column to word wrap at when in comment mode. The default is 76.
TAB-SIZE
How many spaces to use when tab is hit. The default is 0 which
means use hard tabs (which look like 8 spaces).
C-STARS
The number of stars to use at the left when in comment mode.
Use " *" if you use this style (1) (the default):
/*
*
*/
Use "**" if you use this style (2):
/*
**
*/
COMET
Match this with C-STARS:
Use " */" for style (1) and "*/" for style (2).
BOXED-COMMENT-SPACE
The number of blank lines before and after text in boxed comment.
Default is 1.
BOXED-COMMENT-TRAILING-BLANKS
Blanks between text and *. Default is 1.
BOXED-COMMENT-EDGE-STARS
You probably want to match this with C-STARS. Use "*" or "**".
System Variables
tab-size
This is set to the constant tab-size. You can change this with
c-mode-hook.
word-wrap
When in comment mode, word-wrap is set to the comment-wrap-column.
When commant mode ends, it is reset to 0.
Buffer Variables
"comment-offset" (number)
Hooks
c-mode-hook
This hook is called (if it exists) after c mode has initialized
itself. With this hook you can override settings or do those few
extra things you wished c mode set up. For example, this is the
perfect place to set the tab-size to what you think it should be.
This is a program you add to your code (typically in myme.mut).
Use this hook if you don't want to modify the constants in
cmode.mut.
Customizing (usually done in c-mode-hook)
c-mode-etc (int indent-level comment-wrap-column) (string c-stars comet)
Call this routine to change routine stuff.
Default (done by c-mode) is
(c-mode-etc INDENT-LEVEL COMMENT-WRAP-COLUMN C-STARS COMET)
c-mode-boxed (int boxed-comment-space boxed-comment-trailing-blanks)
(string boxed-comment-edge-stars)
Use this to change the boxed comment style.
Default (done by c-mode) is
(c-mode-boxed BOXED-COMMENT-SPACE BOXED-COMMENT-TRAILING-BLANKS
BOXED-COMMENT-EDGE-STARS)
========================================================================
== More Help For C Programming ==
========================================================================
Package: cstuff.mut
How loaded: Manually
Description:
A few routines I didn't feel like integrating into C mode.
Functions:
end-slide M-`
Slide all text to the right of the cursor so that the last character
on the line is in column 78. You can use C-u<column> to override
the 78 or just change the constant in cstuff.mut. This is real
handy if have a bunch of one line comments that you want to end in
same column. For example:
switch (foo)
{
case x: /* we do this amazing thing when x */
case y: /* and doodah when y */
Just put the cursor in the white space between before the command
and press "M-`".
c-header-with-text Not bound
This is used to generate fancy headers that look like:
/* ********************************************************* */
/* ********************* Fancy Header ********************** */
/* ********************************************************* */
Just answer "Fancy Header" when you are asked for the header text.
========================================================================
== Mutt Mode ==
========================================================================
Package: muttmode.mut
How loaded:
Autoloaded when a buffer with extension ".mut" created or when a file
is read with "-*-mutt-*-" in the first line.
Modes:
Major: Mutt
Minor: none or comment
Description:
Electric Mutt mode. Pretty much the same as C mode but for Mutt code.
See muttmode.mut for more info.
========================================================================
== Directory Stack ==
========================================================================
Package: dir.mut
How loaded: Auto loaded in me2.mut.
Description:
Directory stack ala c-shell (UNIX only). The stack size is fixed but
can be easily changed in dir.mut.
Functions:
cd Auto Loaded
Change the current directory.
dirs Not auto loaded
Show the contents of the directory stack. The top entry is the
current directory, next is the directory you left to get to the
current directory. Use C-l to clear the stack from the display.
pwd Auto Loaded
Show the current directory.
pu Auto Loaded
Change the current directory, using the stack to save the changes.
(pu directory) pushes the current directory on the stack and sets
the current directory to directory.
(pu "") swaps the top 2 entries on the stack.
(pu +n) swaps the top of the stack with the nth stack item. n
starts at zero.
po Not auto loaded
Discards the top entry on the stack and sets the current directory
to the new top of stack.
========================================================================
== Text Mode ==
========================================================================
Package: textmode.mut
How loaded:
Autoloaded when a buffer with extension ".doc" or ".txt" created or
when a file is read with "-*-text-*-" in the first line.
Modes:
Major: Text
Minor: none
Description:
Text mode. Help with editing documents, etc. Does line centering,
region centering, auto word wrap, format paragraphs, mark paragraphs,
move the cursor about in a paragraph, etc.
Functions:
adjust-block M-j
Format all lines in a block (lines between dot and mark inclusive).
Uses sysvar (word-wrap) or constant fill-column as the right margin.
center-line M-s
Center the text in the line that the cursor is on. With C-U, center
n lines. Uses (word-wrap) or (screen-width) as right margin.
center-region Not bound
Center all lines in a block.
underline-line Not bound
Underline a line of text. All nonspace characters are underlined
with dashes.
forward-paragraph M-e
Attempts to move to the end of a paragraph.
backward-paragraph M-a
Attempts to move to the begining of a paragraph.
mark-paragraph M-h
Attempts to make the region include the paragraph the cursor is in.
Put mark at beginning of this paragraph, point at end. If between
paragraphs, mark the next one.
cut-paragraph Not bound
Cut to end of paragraph.
backward-cut-paragraph Not bound
Cut back to start of paragraph.
Constants that can be set to affect text mode.
FILL-COLUMN
This is used to set the right margin in text mode. Default is 72.
TAB-SIZE
How many spaces to use when tab is hit. The default is 0 which
means use hard tabs (which look like 8 spaces).
System Variables
tab-size
This is set to the constant TAB-SIZE. You can change this with
text-mode-hook.
word-wrap
This is set to the constant FILL-COLUMN. You can change this with
text-mode-hook.
Hooks
text-mode-hook
This hook is called (if it exists) after text mode has initialized
itself. With this hook you can override settings or do those few
extra things you wished text mode set up. For example, this is
the perfect place to set the tab-size to what you think it should
be.
This is a program you add to your code (typically in myme.mut).
Use this hook if you don't want to modify the constants in
textmode.mut.
Customizing (usually done in text-mode-hook)
text-fill-column [int fill-column]
This is only currently used if word-wrap is 0. It basically sets
FILL-COLUMN.
(text-fill-column) : returns the current value of FILL-COLUMN.
(text-fill-column fill-column) : Sets FILL-COLUMN to fill-column.
Notes:
You can't call this until text mode is loaded.
I'm not real sure about the use of this. Set it if you set
word-wrap to zero. I'll need to think some more on how this
should work.
========================================================================
== Search [and Replace] Across Files ==
========================================================================
Package: findit.mut
How loaded: Autoloaded in me2.mut
Description:
Uses grep to search for a string in many files. Once all the files
are found, the first file is visited and the string is looked for
with incremental search. You can continue the search, edit or do
anything you want. Once you are finished, use C-xC-n to visit the
next file containing the string.
With arg (C-u), do a search and replace across a bunch of files. In
other aspects, acts the same as search.
Functions:
findit Not bound
Search for a string. Use C-u for search and replace.
showit C-xC-n
Goto the next file containing the string.
========================================================================
== Gomoku Game ==
========================================================================
Package: gomoku.mut
How loaded: Manually
Description:
GNU Emacs Gomoku is a game played between two players (one of which is
ME) on a rectangular board. Each player, in turn, marks a free
square of its choice. The winner is the first one to mark five
contiguous squares in any direction (horizontally, vertically or
diagonally).
For more info, "use the source, Luke".
Functions:
gomoku Not bound
========================================================================
== Hide Buffers ==
========================================================================
Package: hidebuf.mut
How loaded: part of me2.mut
Description:
Implements a "soft" buffer hidden bit. Buffers can be put aside for a
little while and restored later. I use this as a kind of workspace
manager - when I go off on a tangent, I can hide the files I'm working
on and when I've finished, unhide the files and pick up where I left
off. Hiding files gets them out of the way of your current work.
Functions:
next-buffer F-2
Find the next unhidden buffer and make it the current one. Next
means alphabetically. With this routine, you can just bang on
function key 2 to move though all the buffers.
prev-buffer Not bound
Find the previous unhidden buffer and make it the current one.
hide-buffer M-h
Hide the current buffer.
unhide-buffer Not bound
Unhide a buffer by name.
unhide-buffers Not bound
Unhide all buffers.
========================================================================
== Hook Support ==
========================================================================
Package: hook.mut
How loaded: part of me2.mut.
Description:
Provides support for the hooks that ME2 calls: enter-ME-hook,
leave-ME-hook, process-hook, buffer-created-hook and read-file-hook.
In addition, it creates two hooks of its own for interactive
buffers: Ibuffer-created-hook and Iread-file-hook.
The interactive hooks are called for buffers that have the Interactive
bit set. See buffer-flags in ME2MUTT.DOC of some more info.
If you program uses a hook, it should register the hook (probably in a
MAIN routine). In this way, many programs can share hooks with a
minimum of fuss.
I don't support two hooks:
- modeline-hook : Needs to be handled differently. See modeline.mut.
- key-pressed-hook : Slows things down too much. Your on your own.
Functions:
(register-hook hook-id name-of-routine-to-call) Not bound
Get the hook-id out of me2.h. name-of-routine-to-call is string.
Must not be Hidden.
========================================================================
== Mail Mode ==
========================================================================
Package: mailmode.mut
How loaded: Auto loaded or via the MEMODE environment variable
Modes:
Major: Text
Minor: Mail
Description:
A minor mode of text-mode.
A [short] set of programs that make it a bit easier to work with
electronic mail or Usenet notes.
Functions:
mail-mode Not bound
Turns on mail mode.
Here are two way to get mail-mode turned on automatically when you
edit mail:
set-mode (in alamode.mut) sets this mode if the environment variable
MEMODE is set to "mail". In my .profile, I have:
EDITOR=$HOME/bin/me2
MAILER=mailx
In .kshrc:
alias mail="MEMODE=mail $MAILER"
Thus, whenever I type "mail" and get into the editor, I get ME2 in
mail-mode.
Another (better) way to do this is to note the name the mailer uses
for temporary files (the ones it uses to hold the mail you are
editing). I use mailx and the form is: "/tmp/Re<digits>". So,
to get mail-mode when editing mail, add
(auto-mode-list TRUE
'Re[0-9]+$' "mail" ;; mailx: "/tmp/Re<digits>"
)
to your startup file (myme.mut).
mail-format-quote-region M-` (meta backquote)
Format a region-block (all lines in region) and put a prefix
(default is "> ") in front of each line. With arg (C-u), askes
what to use as a prefix.
This is very handy when want to reply to something that was sent to
you. You can cut out the relevant chunk and have it formated
nicely. If you are replying to serveral people in the same
letter, use the arg option - this allows you to prefix everything
Peter says with something like "Peter> " so that everybody
receiving your mail will know who said what. You can change the
default by changing "quoter" in mailmode.mut.
mail-quote-region Not bound
Put the prefix in front of every line in the region. No formating.
Constants:
quoter : The default string that is used when quoting text.
Initially "> ".
========================================================================
== Read Only Buffers ==
========================================================================
Package: nomunge.mut
How loaded: Autoloaded in me2.mut
Description:
An attempt at a read only mode for buffers and files. Its not very
robust but works OK for people who aren't trying to mess with the
buffer. At any rate, they can't write the file out so any buffer
changes won't change the file.
Functions:
buffer-nomunge Not bound Autoloaded
Rebind a bunch of keys to make it hard to change buffer contents
accidentally.
========================================================================
== Picture Mode ==
========================================================================
Package: picture.mut
How loaded: Auto loaded in me2.mut
Description:
GNU Emacs Picture mode. This mode is used to edit tables, text
pictures, etc. Well documented in picture.mut or use the GNU Emacs
manual.
I've added a picture function that I find useful: picture-box.
Note: My port is something of a quick hack. I didn't implement
rectangle registers (I put everything into the cut buffer). I don't
use picture mode all that much and so haven't really beat on it.
In my limited testing, everything seems to work but I'm sure there
some things I missed.
Functions:
edit-picture Not bound Autoloaded
picture-box Not bound
Draw a box around the rectangle region.
========================================================================
== External Processes ==
========================================================================
These two packages use the compute server. See me2mutt.doc and
comserver.doc for more info on what it does and how to run it.
Package: compile.mut
How loaded: compile and grep are autoloaded in me2.mut
Description:
Run a compile, grep or just about any output only process (such as
"ls" or "cc"), collect the output and optionally visit each line in
each file that is flagged.
Output is collected as the compile sends it out - you can still edit
normally. This a "multiprocessing" compile - many things are going
on at once. Note that ME only processes the compile output when
nothing else is happening - if a Mutt program is running or ME is
waiting for you (eg waiting for you to answer a question in the
minibuffer), compile output is queued and will be processed when
things are quiet again. The *Compile* window can be removed from
the screen without affecting things. DON'T delete the *Compile*
buffer (until to compile is done and you don't care about the
output).
Modeled after grep and compile in GNU Emacs.
This stuff only works on machines running unix (at least until
somebody ports the compute server to other OSes).
The compute server must be running. It is what actually runs the
compiles - ME just processes the output. See create-process in
ME2MUTT.DOC for how to run the compute server.
Functions:
compile Not bound Autoloaded
Run a command, in a shell and put the output in the *Compile*
buffer. You can run things like make, "cc -o foo foo.c", ls or
just about anything that is output only (can't send input to the
remote processes). Since the command is run in a shell (sh), you
can use things like $HOME, *.c, etc.
Use compile-next-error to step through the errors.
grep Not bound Autoloaded
Run grep, collect the output and use compile-next-error to step
through the matches.
stop-compile Not bound
Stop the process running in the *Compile* buffer.
compile-next-error C-x` (control-X backquote)
Looks in the *Compile* buffer, makes a list of errors (or grep
matches), visits the file(s) with the error(s) and puts the cursor
at the bogus line. Each time you press C-X`, the cursor moves to
the next error. You can edit as much as you like at each error.
You can start using C-X` before the compile is done (it is
possible for the error list to get out of sync if you change a
file before the compiler is done with it but that should be a
minor problem).
Knows how to parse the output of: mc2, grep, HP-UX 8.0 cc, Apollo
cc and hopefully other compilers. I tried to match what GNU Emacs
does but working with regular expressions can be a real pain in
the butt so there might be some bugs in here. Apollo cc is a real
pain.
Doesn't know about ld: If you have loader errors, you won't see
them if you remove the *Compile* window or shrink it so you can't
read all of it. I usually just look at the *Compile* buffer to
make sure all went as expected.
Hooks
process-hook is used to capture the output of the compile or grep.
Package: shell.mut
How loaded: Manually
Description:
Attempts to make it easy to run output only programs in a buffer.
Its a quick hack but might be interesting.
Functions:
shell-shock Not bound
Hooks
process-hook is used to capture the output of the command.
========================================================================
== Tags ==
========================================================================
Package: tags.mut
How loaded: manually
Description:
Tags are a small database for C functions. Have you ever edited some
C code and come across a function and say to yourself "I wonder
where this function is?", well, tags can help answer that for you.
Tags uses the Unix ctags command.
To start things, create the tags database:
In the current directory: "ctags -xtw files.[ch] >Tags"
In a subtree: "find . -name '*.[ch]' -print | xargs ctags -xtw >Tags"
Keep the tags file in the directory it is created in.
When the tags code is loaded, it will ask you what directory the tags
file is in. If you are not going to be changing directories, you
can use ".". If you might, give the full path name for the
directory (file name completion is on). Remember to only give the
directory name.
Functions:
goto-tag M-.
Look up a keyword in the tags data base, visit the file it is
defined in and put the dot at the start of the routine.
If just hit return when asked for the tag, the word after the dot is
used. This is nice for things like:
foobar(fred,sam);
^ dot
Hit M-. <enter> and you will in the file that foobar is defined
in.
select-tag-file Not bound
Load the tags database. See above. If you want to change to a new
database, just run this again.
where-is-tag Not bound
Shows the file that the tag is defined in. As in goto-tag but just
tells you the file instead of editing it.
========================================================================
== OS Stuff ==
========================================================================
Package: unix.mut
How loaded:
Compiled and unix.mco is renamed to osstuff.mco. osstuff.mco is
loaded by me2.mut.
Description:
osstuff is a file that is loaded so you have a place to put all your
OS specific code. When you use ME on a variety of machines, this is
very handy.
Functions (unix.mut):
chmod Not bound
Runs change mode on the file connected to the current buffer. Real
handy when you check out a file, read it in, edit it and when you
try to save you find out it is read-only. ick. Just run chmod and
enter "a+w" and then save it.
Some stuff to try and figure out the termainal type.
========================================================================
== VT100 Type Termainals ==
========================================================================
Package: xterm.mut
How loaded:
In unix.mut. The environment variable "TERM" is looked at to try and
figure out if this file should be loaded.
Description:
Some terminals support function keys, arrow keys, etc. This file adds
some support for xterm, vt100 and ansi style termainals.
Decodes arrow keys and function keys (those keys that send out "Escape
[ ...").
========================================================================
== HP Terminal Support ==
========================================================================
Package: hpterm.mut
How loaded:
In unix.mut. The environment variable "TERM" is looked at to try and
figure out if this file should be loaded.
Description:
Try and sent up a HP terminal so ME can understand it when you press a
function or arrow key. HP terminals make life difficult for Emacs
because the function keys send out text that is the same as other
Emacs commands. It can be very hard to tell if you pressed down arrow
or M-b (which do two very different things).
In order for this stuff to work, you must be using a version of ME
that knows about HP terminals. You can turn this on in config.h.
========================================================================
== Window Scrolling ==
========================================================================
Package: wscroll.mut
How loaded: manually
Description:
Some routines to move the current window right or left.
Functions:
scroll-right C-x<
scroll-left C-x>
Manually scroll the current window horizontally.
Trys to keep the cursor on screen to prevent the update routines from
undoing the scroll.
cursor-is-right Not bound
cursor-is-left Not bound
Shift the window so that the cursor is at the right or left margin
(if possible).
center-screen-around-cursor-horizontally Not bound
Try and put the cursor in the middle of the screen.